<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>引入方式</title>
</head>
<body>
  
  <!-- 行内js：必须是事件格式 -->
  <button onclick="console.log('点击后执行')">按钮</button>

  <script>
    console.log('内部js')
  </script>

  <!-- 引入外部js -->
  <script src="./scripts/text.js"></script>
</body>
</html>